
#include "reservationsystem.h"
#include "userinterface.h"

using namespace std;
using namespace aviation;

int main()
{
	std::ofstream errorStream("errorLog.txt");
	std::streambuf* originalStreamBuffer = std::cerr.rdbuf(errorStream.rdbuf());

	ReservationSystem reservationSystem;

	// Add a super secret backdoor user. In case we accidentally erase the user DB,
	// we will still be able to log in using this account.
	reservationSystem.userDB.AddData(User("claire", "fmp", true));

	UserInterface userInterface(reservationSystem);

	userInterface.Run();

	std::cerr.rdbuf(originalStreamBuffer);

	return 0;
}